import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/order_list_entity.dart';

OrderListEntity $OrderListEntityFromJson(Map<String, dynamic> json) {
	final OrderListEntity orderListEntity = OrderListEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		orderListEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		orderListEntity.msg = msg;
	}
	final List<OrderListData>? data = jsonConvert.convertListNotNull<OrderListData>(json['data']);
	if (data != null) {
		orderListEntity.data = data;
	}
	return orderListEntity;
}

Map<String, dynamic> $OrderListEntityToJson(OrderListEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

OrderListData $OrderListDataFromJson(Map<String, dynamic> json) {
	final OrderListData orderListData = OrderListData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		orderListData.id = id;
	}
	final String? orderNo = jsonConvert.convert<String>(json['order_no']);
	if (orderNo != null) {
		orderListData.orderNo = orderNo;
	}
	final String? status = jsonConvert.convert<String>(json['status']);
	if (status != null) {
		orderListData.status = status;
	}
	final String? storeId = jsonConvert.convert<String>(json['store_id']);
	if (storeId != null) {
		orderListData.storeId = storeId;
	}
	final String? payChannel = jsonConvert.convert<String>(json['pay_channel']);
	if (payChannel != null) {
		orderListData.payChannel = payChannel;
	}
	final String? qdys = jsonConvert.convert<String>(json['qdys']);
	if (qdys != null) {
		orderListData.qdys = qdys;
	}
	final String? usdt = jsonConvert.convert<String>(json['usdt']);
	if (usdt != null) {
		orderListData.usdt = usdt;
	}
	final String? score = jsonConvert.convert<String>(json['score']);
	if (score != null) {
		orderListData.score = score;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		orderListData.createdAt = createdAt;
	}
	final String? freightPrice = jsonConvert.convert<String>(json['freight_price']);
	if (freightPrice != null) {
		orderListData.freightPrice = freightPrice;
	}
	final String? integral = jsonConvert.convert<String>(json['integral']);
	if (integral != null) {
		orderListData.integral = integral;
	}
	final String? isPay = jsonConvert.convert<String>(json['is_pay']);
	if (isPay != null) {
		orderListData.isPay = isPay;
	}
	final String? tag = jsonConvert.convert<String>(json['tag']);
	if (tag != null) {
		orderListData.tag = tag;
	}
	final String? statusStr = jsonConvert.convert<String>(json['status_str']);
	if (statusStr != null) {
		orderListData.statusStr = statusStr;
	}
	final String? isShowNoticeSend = jsonConvert.convert<String>(json['is_show_notice_send']);
	if (isShowNoticeSend != null) {
		orderListData.isShowNoticeSend = isShowNoticeSend;
	}
	final String? goodsCount = jsonConvert.convert<String>(json['goods_count']);
	if (goodsCount != null) {
		orderListData.goodsCount = goodsCount;
	}
	final String? money = jsonConvert.convert<String>(json['money']);
	if (money != null) {
		orderListData.money = money;
	}
	final String? money1 = jsonConvert.convert<String>(json['money1']);
	if (money1 != null) {
		orderListData.money1 = money1;
	}
	final String? company = jsonConvert.convert<String>(json['company']);
	if (company != null) {
		orderListData.company = company;
	}
	final String? company1 = jsonConvert.convert<String>(json['company1']);
	if (company1 != null) {
		orderListData.company1 = company1;
	}
	final String? payChannelStr = jsonConvert.convert<String>(json['pay_channel_str']);
	if (payChannelStr != null) {
		orderListData.payChannelStr = payChannelStr;
	}
	final String? payMoney = jsonConvert.convert<String>(json['pay_money']);
	if (payMoney != null) {
		orderListData.payMoney = payMoney;
	}
	final String? payMoney1 = jsonConvert.convert<String>(json['pay_money1']);
	if (payMoney1 != null) {
		orderListData.payMoney1 = payMoney1;
	}
	final String? payCompany = jsonConvert.convert<String>(json['pay_company']);
	if (payCompany != null) {
		orderListData.payCompany = payCompany;
	}
	final String? payCompany1 = jsonConvert.convert<String>(json['pay_company1']);
	if (payCompany1 != null) {
		orderListData.payCompany1 = payCompany1;
	}
	final OrderListDataStore? store = jsonConvert.convert<OrderListDataStore>(json['store']);
	if (store != null) {
		orderListData.store = store;
	}
	final List<OrderListDataOrderGoods>? orderGoods = jsonConvert.convertListNotNull<OrderListDataOrderGoods>(json['order_goods']);
	if (orderGoods != null) {
		orderListData.orderGoods = orderGoods;
	}
	return orderListData;
}

Map<String, dynamic> $OrderListDataToJson(OrderListData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['order_no'] = entity.orderNo;
	data['status'] = entity.status;
	data['store_id'] = entity.storeId;
	data['pay_channel'] = entity.payChannel;
	data['qdys'] = entity.qdys;
	data['usdt'] = entity.usdt;
	data['score'] = entity.score;
	data['created_at'] = entity.createdAt;
	data['freight_price'] = entity.freightPrice;
	data['integral'] = entity.integral;
	data['is_pay'] = entity.isPay;
	data['tag'] = entity.tag;
	data['status_str'] = entity.statusStr;
	data['is_show_notice_send'] = entity.isShowNoticeSend;
	data['goods_count'] = entity.goodsCount;
	data['money'] = entity.money;
	data['money1'] = entity.money1;
	data['company'] = entity.company;
	data['company1'] = entity.company1;
	data['pay_channel_str'] = entity.payChannelStr;
	data['pay_money'] = entity.payMoney;
	data['pay_money1'] = entity.payMoney1;
	data['pay_company'] = entity.payCompany;
	data['pay_company1'] = entity.payCompany1;
	data['store'] = entity.store.toJson();
	data['order_goods'] =  entity.orderGoods.map((v) => v.toJson()).toList();
	return data;
}

OrderListDataStore $OrderListDataStoreFromJson(Map<String, dynamic> json) {
	final OrderListDataStore orderListDataStore = OrderListDataStore();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		orderListDataStore.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		orderListDataStore.name = name;
	}
	final String? logo = jsonConvert.convert<String>(json['logo']);
	if (logo != null) {
		orderListDataStore.logo = logo;
	}
	return orderListDataStore;
}

Map<String, dynamic> $OrderListDataStoreToJson(OrderListDataStore entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['logo'] = entity.logo;
	return data;
}

OrderListDataOrderGoods $OrderListDataOrderGoodsFromJson(Map<String, dynamic> json) {
	final OrderListDataOrderGoods orderListDataOrderGoods = OrderListDataOrderGoods();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		orderListDataOrderGoods.id = id;
	}
	final String? orderNo = jsonConvert.convert<String>(json['order_no']);
	if (orderNo != null) {
		orderListDataOrderGoods.orderNo = orderNo;
	}
	final OrderListDataOrderGoodsSkuSnap? skuSnap = jsonConvert.convert<OrderListDataOrderGoodsSkuSnap>(json['sku_snap']);
	if (skuSnap != null) {
		orderListDataOrderGoods.skuSnap = skuSnap;
	}
	final String? buyNum = jsonConvert.convert<String>(json['buy_num']);
	if (buyNum != null) {
		orderListDataOrderGoods.buyNum = buyNum;
	}
	final String? allPrice = jsonConvert.convert<String>(json['all_price']);
	if (allPrice != null) {
		orderListDataOrderGoods.allPrice = allPrice;
	}
	final String? allIntegral = jsonConvert.convert<String>(json['all_integral']);
	if (allIntegral != null) {
		orderListDataOrderGoods.allIntegral = allIntegral;
	}
	final String? unitPrice = jsonConvert.convert<String>(json['unit_price']);
	if (unitPrice != null) {
		orderListDataOrderGoods.unitPrice = unitPrice;
	}
	final String? unitIntegral = jsonConvert.convert<String>(json['unit_integral']);
	if (unitIntegral != null) {
		orderListDataOrderGoods.unitIntegral = unitIntegral;
	}
	final String? company = jsonConvert.convert<String>(json['company']);
	if (company != null) {
		orderListDataOrderGoods.company = company;
	}
	final String? company1 = jsonConvert.convert<String>(json['company1']);
	if (company1 != null) {
		orderListDataOrderGoods.company1 = company1;
	}
	final String? money = jsonConvert.convert<String>(json['money']);
	if (money != null) {
		orderListDataOrderGoods.money = money;
	}
	final String? money1 = jsonConvert.convert<String>(json['money1']);
	if (money1 != null) {
		orderListDataOrderGoods.money1 = money1;
	}
	final String? statusDetail = jsonConvert.convert<String>(json['status_detail']);
	if (statusDetail != null) {
		orderListDataOrderGoods.statusDetail = statusDetail;
	}
	return orderListDataOrderGoods;
}

Map<String, dynamic> $OrderListDataOrderGoodsToJson(OrderListDataOrderGoods entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['order_no'] = entity.orderNo;
	data['sku_snap'] = entity.skuSnap.toJson();
	data['buy_num'] = entity.buyNum;
	data['all_price'] = entity.allPrice;
	data['all_integral'] = entity.allIntegral;
	data['unit_price'] = entity.unitPrice;
	data['unit_integral'] = entity.unitIntegral;
	data['company'] = entity.company;
	data['company1'] = entity.company1;
	data['money'] = entity.money;
	data['money1'] = entity.money1;
	data['status_detail'] = entity.statusDetail;
	return data;
}

OrderListDataOrderGoodsSkuSnap $OrderListDataOrderGoodsSkuSnapFromJson(Map<String, dynamic> json) {
	final OrderListDataOrderGoodsSkuSnap orderListDataOrderGoodsSkuSnap = OrderListDataOrderGoodsSkuSnap();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		orderListDataOrderGoodsSkuSnap.id = id;
	}
	final List<String>? specKey = jsonConvert.convertListNotNull<String>(json['spec_key']);
	if (specKey != null) {
		orderListDataOrderGoodsSkuSnap.specKey = specKey;
	}
	final List<String>? specVal = jsonConvert.convertListNotNull<String>(json['spec_val']);
	if (specVal != null) {
		orderListDataOrderGoodsSkuSnap.specVal = specVal;
	}
	final String? imgPath = jsonConvert.convert<String>(json['img_path']);
	if (imgPath != null) {
		orderListDataOrderGoodsSkuSnap.imgPath = imgPath;
	}
	final OrderListDataOrderGoodsSkuSnapGoods? goods = jsonConvert.convert<OrderListDataOrderGoodsSkuSnapGoods>(json['goods']);
	if (goods != null) {
		orderListDataOrderGoodsSkuSnap.goods = goods;
	}
	final List<OrderListDataOrderGoodsSkuSnapSpec>? spec = jsonConvert.convertListNotNull<OrderListDataOrderGoodsSkuSnapSpec>(json['spec']);
	if (spec != null) {
		orderListDataOrderGoodsSkuSnap.spec = spec;
	}
	return orderListDataOrderGoodsSkuSnap;
}

Map<String, dynamic> $OrderListDataOrderGoodsSkuSnapToJson(OrderListDataOrderGoodsSkuSnap entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['spec_key'] =  entity.specKey;
	data['spec_val'] =  entity.specVal;
	data['img_path'] = entity.imgPath;
	data['goods'] = entity.goods.toJson();
	data['spec'] =  entity.spec.map((v) => v.toJson()).toList();
	return data;
}

OrderListDataOrderGoodsSkuSnapGoods $OrderListDataOrderGoodsSkuSnapGoodsFromJson(Map<String, dynamic> json) {
	final OrderListDataOrderGoodsSkuSnapGoods orderListDataOrderGoodsSkuSnapGoods = OrderListDataOrderGoodsSkuSnapGoods();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		orderListDataOrderGoodsSkuSnapGoods.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		orderListDataOrderGoodsSkuSnapGoods.name = name;
	}
	final String? storeId = jsonConvert.convert<String>(json['store_id']);
	if (storeId != null) {
		orderListDataOrderGoodsSkuSnapGoods.storeId = storeId;
	}
	final String? areaId = jsonConvert.convert<String>(json['area_id']);
	if (areaId != null) {
		orderListDataOrderGoodsSkuSnapGoods.areaId = areaId;
	}
	return orderListDataOrderGoodsSkuSnapGoods;
}

Map<String, dynamic> $OrderListDataOrderGoodsSkuSnapGoodsToJson(OrderListDataOrderGoodsSkuSnapGoods entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['store_id'] = entity.storeId;
	data['area_id'] = entity.areaId;
	return data;
}

OrderListDataOrderGoodsSkuSnapSpec $OrderListDataOrderGoodsSkuSnapSpecFromJson(Map<String, dynamic> json) {
	final OrderListDataOrderGoodsSkuSnapSpec orderListDataOrderGoodsSkuSnapSpec = OrderListDataOrderGoodsSkuSnapSpec();
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		orderListDataOrderGoodsSkuSnapSpec.name = name;
	}
	final String? val = jsonConvert.convert<String>(json['val']);
	if (val != null) {
		orderListDataOrderGoodsSkuSnapSpec.val = val;
	}
	return orderListDataOrderGoodsSkuSnapSpec;
}

Map<String, dynamic> $OrderListDataOrderGoodsSkuSnapSpecToJson(OrderListDataOrderGoodsSkuSnapSpec entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['name'] = entity.name;
	data['val'] = entity.val;
	return data;
}